//package com.example.demo.config.loginConfig;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@Configuration
//public class AppConfig implements WebMvcConfigurer {
//
//    @Autowired
//    private LoginInterceptor loginInterceptor;
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(loginInterceptor) //实现的拦截器
//                .addPathPatterns("/**")  //拦截所有请求
//                .excludePathPatterns("/css/**") //以下都是不拦截的请求
//                .excludePathPatterns("/js/**")
//                .excludePathPatterns("/img/**")
//                .excludePathPatterns("/login.html")
//                .excludePathPatterns("/reg.html")
//                .excludePathPatterns("/topic_list.html")
//                .excludePathPatterns("/find_password.html")
//                .excludePathPatterns("/user/login")
//                .excludePathPatterns("/user/reg")
//                .excludePathPatterns("/topic/topicList");
//    }
//}